﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using IridiumDB.Model;
using IridiumFlares;

namespace FlaresAtHand
{
    public partial class FlareForm : Form
    {
        private List<Flare> _flares;
        public FlareForm()
        {
            InitializeComponent();
        }

        public void ShowFlares(List<Flare> flares)
        {
            _flares = flares;
            FillGrid();
        }

        private void FillGrid()
        {
            dataGridFlares.DataSource = (from flare in _flares
                                        select new {
                                            Time = flare.Time,
                                            Int = flare.Intensity,
                                            Az = flare.Azimuth,
                                            Alt = flare.Altitude,
                                            SatNo = flare.SatelliteNo
                                        }).ToList();
        }
    }
}